%h1 My Blog
- @blog_posts.each do |blog_post|
  
  %p= blog_post._id

  %p
    %b= link_to blog_post.title, blog_post

  %p{style: "float: left;"}
    = link_to "Add Comment", new_comment_path(blog_post)

  %p= blog_post.content



  - blog_post.comments.each do |com|

    %p=com.content


  %p{style: "float: right;"}
    = link_to "Delete", blog_post, method: :delete, confirm: "Are you sure you want to delete this post?"

  %p{style: "float: left;"}
    = link_to "Edit", edit_blog_post_path(blog_post)


  %hr{style: "clear: both;"}
 

  %br
 

= link_to 'New Post', new_blog_post_path
